assume cs:code,ds:data

data segment
    db 'Welcome to masm!',0
data ends

code segment
start:  mov ax,data
        mov ds,ax
        mov si,0
        mov dh,8  ;行
        mov dl,3    ;列
        mov cl,2    ;颜色

        call show_str
        
        mov ax,4c00H
        int 21

    show_str:
        mov al,0a0h
        dec dh
        mul dh
        mov bx,ax
        mov al,2
        dec dl
        mul dl
        add bx,ax
        mov ax,0b800H
        mov es,ax
        mov di,0
        mov al,cl   ;颜色
    s:  mov cl,ds:[si]
        mov ch,0
        jcxz ok
        mov es:[bx+di],cl  
        mov es:[bx+di+1],al
        add di,2
        inc si
        jmp short s

    ok: 
        ret
code ends
end start

